<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="../000-assets/js/react.development.js"></script>
    <script src="../000-assets/js/react-dom.development.js"></script>
    <script src="../000-assets/js/babel.min.js"></script>
  </head>
  <body>
    <div id="root"></div>
    <!-- 注意一定要把 type="text/babel" 加上，这样才能支持jsx语法 -->
    <script type="text/babel">
      /*
            其实jsx就像是React.createElement()的一个语法糖，你可以直接在js的代码里写html代码，怎么样，看上去是不是方便多了
      */
      const button = (
        <button onClick={() => console.log(123123)}>click me</button>
      );
      const root = ReactDOM.createRoot(document.querySelector("#root"));
      root.render(button);
    </script>
  </body>
</html>
